import { labelPrinter } from '@/api/manage/printer';

export default () => {
	async function handlePrinter(row: any) {
		console.log('处理打印', row);
		const res = await labelPrinter({
			sn: row.sn,
			content: `
                <PAGE>
                    <SIZE>50,30</SIZE>
                    <TEXT x="9" y="10" w="1" h="2" r="0">#001 一号桌 1/2</TEXT>
                    <TEXT x="60" y="80" w="2" h="2" r="0">西红柿炒蛋</TEXT>
                    <TEXT x="9" y="180" w="1" h="1" r="0">张女士 13600001111</TEXT>
                </PAGE>
        `,
		});
	}
	return {
		handlePrinter,
	};
};
